package com.jbp.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jbp.model.Room;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.jbp.model.RoomType;
import com.jbp.service.RoomTypeService;
import com.jbp.utils.PageUtils;
import com.jbp.utils.R;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 
 *
 * @author lucheng feng
 * @email jbp@gmail.com
 * @date 2020-06-18 21:26:42
 */
@Api(tags ="APP接口--房间类型相关接口" )
@ApiIgnore
@RestController
@RequestMapping("/rest/roomtype")
public class RoomTypeController {
    @Autowired
    private RoomTypeService roomTypeService;

    /**
     * 房间类型列表
     */
    @ApiOperation(value="查询房间类型列表",notes="查询房间类型列表查询房间类型列表")
    @ApiResponses({
            @ApiResponse(code = 200,message = "成功",response = RoomType.class),
            @ApiResponse(code = 201,message = "返回失败信息")
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token",value = "token",paramType = "query"),
            @ApiImplicitParam(name="sessionId",value = "sessionId",paramType = "query")
    })
    @GetMapping("/list")
    public R list(){
        List<RoomType> list= roomTypeService.list(new QueryWrapper<RoomType>().orderByAsc("order_num"));
        return R.ok().put("data", list);
    }



}
